<template>
	<div class="wdxq2" :style="{'min-height':Height-73+'px'}">
		<div class="wdxq_title flex align_center">
			<i class="el-icon-arrow-left" style="float: left;margin-left: 4%;font-size: 2.4rem;" @click="fh"></i>
			<span class="flex1">个人动态</span>
			<div class="homePage_titleImg" @click="fb">
				<img src="../../../../static/img/images/dt1.jpg" style="width: 100%;"  />
			</div>
		</div>
		<div class="wdxq_div10 clear2">
			<div class="wdxq_div10l" @click="$router.push({path: '/wode/wddt'})">
				<span>我的发帖</span>
			</div>
			<div class="wdxq_div10l wdxq_div10active">
				<span>我的评论</span>
			</div>
		</div>
		<div>
			<div class="wdxq_div11" v-for="(data,key) in list" @click="jump(data.dy_id)" style="padding: 1rem 5% 1.7rem 5%;">
				<div class="wdxq_div11d1">
					我评论:<span v-html="data.s_content"></span>
				</div>
				<div class="wdxq_div11d2 flex">
					<div class="wdxq_div11d2img">
						<img :src="data.img_url_s" />
					</div>
					<div class="wdxq_div11d2text flex1">
						<p class="wdxq_div11d2textp1">
							@{{data.username}}
						</p>
						<p class="wdxq_div11d2textp2" v-html="data.dy_content">
						</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data: function() {
			return {
				Height:0,
				tabI:0,
				div1left:[{
					'name':'本月',
					'i':0,
				},{
					'name':'上月',
					'i':1,
				},{
					'name':'全部',
					'i':2,
				}],
				list:[],

			}
		},
		mounted() {
			this.Height=document.body.offsetHeight;
			this.getMyDnamicSpeakList();
		},
		methods: {
			jump(id){
				this.$router.push({
					path: '/dongtai2',
					query:{
						'dy_id':id,
					}
				})
			},
			fh(){
        		window.history.go(-1);
        	},
        	fb(){
        		this.$router.push({
					path: '/dtdatil',
				})
        	},
        	getMyDnamicSpeakList(){
				let  loading=this.$loading({
		          lock: true,
		          text: 'Loading',
		          spinner: 'el-icon-loading',
		          background: 'rgba(255, 255, 255, 1)'
		        });
				this.$http.post(this.defines.getMyDnamicSpeakList, {
						uid: window.uid
					}, {
						emulateJSON: true
					})
					.then(
						(data) => {
							this.list=data.data.data.list;
							loading.close();
						},
						(error) => {
							console.log(error);
						}
					);
			},
		}
	}
</script>

<style scoped="scoped">
	.homePage_titleImg {
		width: 1.7rem;
		margin-right: 4%;
		float: right;
	}
</style>